<script setup lang="ts">
import { computed } from "vue";

const props = withDefaults(
  defineProps<{
    padding?: number; // 内边距
    headerContent?: boolean; //是否显示头部
  }>(),
  {
    padding: 0,
    headerContent: false,
  }
);
const getShowHeader = computed(() => props.headerContent);
</script>
<template>
  <div class="pageWrap flex h-full flex-col">
    <div v-if="getShowHeader" class="headerContent">
      <slot name="header"></slot>
    </div>
    <div class="p-5 pageWarp-content"><slot></slot></div>
  </div>
</template>
<style scoped>
.headerContent {
  /* height: 100%; */
  padding: 10px;
  background-color: #fff;
}
.pageWarp-content {
  height: 100%;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}
</style>
